Networks and Graph Theory - Minimum spanning trees.
Summary of steps for applying Kruskal's algorithm.
Kruskal's algorithm finds a minimum spanning tree for a connected weighted graph:
Step 1: | In a table of 2 columns, write down the letters for the edge of smallest weight and the weight - here that is BD with a weight of 1. |
|
||||||||||||||||||
Step 2: | Write down the letters for the edge of next smallest weight and the weight. Here there are four edges each with a weight of 2 (AB, BE, CF and EF) so write them all down in any order. |
|
||||||||||||||||||
Step 3: | Continue listing edges in ascending order of their weight. |
|
||||||||||||||||||
Step 4: | Prepare a basis for the new network by copying the vertices into the approximate position they have in the original network diagram. | |||||||||||||||||||
Step 5: | Start with the smallest edge in the table (the one you wrote down first BD) and draw a line between those vertices in your new diagram. | |||||||||||||||||||
Step 6: | Continue to draw edges in ascending order of weight in your table until all vertices are included. Do NOT include an edge if it will create a cycle. | |||||||||||||||||||